package esb.chapter6.file;

import java.io.File;
import java.io.FileFilter;

public class StartsWithFilter implements FileFilter {

    private String startsWith;
    
    
    public boolean accept(File file) {
        boolean result = false;
        
        if (file.getName().startsWith(startsWith)) {
            result = true;
        }
        return result;
    }

    
    public String getStartsWith() {
        return startsWith;
    }

    public void setStartsWith(String startsWith) {
        this.startsWith = startsWith;
    }
}
